



<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<tiles:insertDefinition name="mainLayout">
  <tiles:putAttribute name="title"  value="Liste des contrats" />
  <tiles:putAttribute name="body">

<script type="text/javascript">
<!--
	function confirmDelete(id)
	{
		return confirm("Voulez-vous vraiment supprimer l'objet ayant pour id: "+id);
	}
//-->
</script>

<s:url id="prepareaddUrl" action="prepareadd" />
<p><s:a href="%{prepareaddUrl}" cssClass="commandLink">Ajouter un objet contrat</s:a></p>

<p class="pageTitle">Liste des contrats</p>

<table width="90%">
  <tr>
	    	<th>ContratType</th>
    						    	<th>Comment</th>
    	    	<th>Status</th>
    	    	<th>Type</th>
    		    	<th>ContratType</th>
												    				    <th>&nbsp;</th>

  </tr>

<s:iterator value="%{#request.contrats}">
  <tr>
	    <td>
    <s:url id="editUrl" action="edit" >
		<s:param name="contratType" value="%{contratType}" />
	</s:url>
    <s:a href="%{editUrl}" cssClass="commandLink"><s:property value="contratType"/></s:a>
    </td>
    						    <td><s:property value="comment"/></td>
    	    <td><s:property value="status"/></td>
    	    <td><s:property value="type"/></td>
    		    <td><s:property value="contratType"/></td>
    										    					    <td>
    <s:url id="deleteUrl" action="delete" >
		<s:param name="contratType" value="%{contratType}" />
	</s:url>
    <s:a href="%{deleteUrl}" cssClass="commandLink" onclick="return confirmDelete(%{contratType});">Supprimer</s:a>
    </td>
					  </tr>
</s:iterator>

</table>

<p class="spacer">&nbsp;</p>

<fieldset title="Recherche">
<legend><b>Recherche d'un objet contrat</b></legend>
<s:form action="search" method="post" validate="false">
			  		<s:textfield label="comment" name="contrat.comment" size="30" />
  		  				  		<s:textfield label="status" name="contrat.status" size="30" />
  		  				  		<s:textfield label="type" name="contrat.type" size="30" />
  		  		  	  	  	  	  <s:submit value="Rechercher"/>
</s:form>
</fieldset>

  </tiles:putAttribute>
</tiles:insertDefinition>
